# -*- coding: utf-8 -*-
"""
TG网格布局组件 - TgGridLayout
网格布局组件，将子组件按网格排列
"""
from PySide6.QtWidgets import QGridLayout
from ..base.layout import TgLayoutMixin


class TgGridLayout(TgLayoutMixin, QGridLayout):
    """TG网格布局"""

    def __init__(self, parent=None, margins='medium', spacing='medium'):
        # 显式调用父类的__init__方法
        if parent:
            QGridLayout.__init__(self, parent)
        else:
            QGridLayout.__init__(self)
        TgLayoutMixin.__init__(self, margins=margins, spacing=spacing)